import { requestClient,requestClientBody } from '#/api/request';

/**
 * 列表
 */
export async function getAllApi() {
  return requestClient.get('/region/lists');
}
/**
 * 树
 */
export async function getCityTreesApi() {
  return requestClient.get('/region/citytrees');
}
export async function getRegionTreesApi() {
  return requestClient.get('/region/regiontrees');
}

/**
 * 新增
 */
export async function createApi(data: any) {
  return requestClientBody.post('/region/add', {form:data});
}

/**
 * 编辑
 */
export async function editApi(data: any) {
  return requestClientBody.post('/region/edit?id='+data.id, {form:data});
}

/**
 * 删除
 */
export async function deleteApi(id: number) {
  return requestClientBody.post('/region/delete?id='+id);
}